package com.example.springboot.controller;

import com.example.springboot.event.CompanyApplySealConsumer;
import com.example.springboot.event.CompanyApplySealEventPublisher;
import com.example.springboot.service.TeacherService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xionglei
 * @version 1.0.0
 * 2021年09月07日 18:46
 */
@RestController
@RequestMapping("/eventPush")
@Slf4j
public class EventPushController {

    @Autowired
    private CompanyApplySealEventPublisher publisher;
    @Autowired
    private TeacherService teacherService;

    @RequestMapping("/event")
    @Transactional(rollbackFor = Exception.class)
    public void eventPush() {
        teacherService.test1();
    }
}
